#CC = aarch64-none-linux-gnu-gcc
CFLAGS = -Wall -O2
SRC = $(wildcard *.c)
OBJS = $(patsubst %.c, %.o, $(SRC))
TARGET = book_mgr


.PHONY: clean install test


$(TARGET): $(OBJS)
	$(CC) $(CFLAGS) $^ -o $@
	@echo "Build finished!"

%.o: %.c %.h
	$(CC) $(CFLAGS) -c $< -o $@

clean:
	-rm -f $(OBJS) $(TARGET)

install:
	cp $(TARGET) /usr/bin/smart_home

test:
	./$(TARGET) abcdef

